package com.free;

import com.free.server.NettyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class FreeCloudRegisterServerApplication implements CommandLineRunner {

    @Autowired
    private NettyServer nettyServer;

    public static void main(String[] args) {
        SpringApplication.run(FreeCloudRegisterServerApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {

        new Thread(nettyServer).start();
    }

}
